Torrance-sparrow off-specular reflection and linear subspaces for object recognition

ABSTRACT

The Torrance-Sparrow model of off-specular reflection is recast in a significantly simpler and more transparent form in order to render a spherical-harmonic decomposition more feasible. By assuming that a physical surface consists of small, reflecting facets whose surface normals satisfy a normal distribution, the model captures the off-specular enhancement of the reflected intensity distribution often observed at large angles of incidence and reflection, features beyond the reach of the phenomenological broadening models usually employed. In passing we remove a physical inconsistency in the original treatment, restoring reciprocity and correcting the dependence of reflectance on angle near grazing incidence. It is noted that the results predicted by the model are relatively insensitive to values of its one parameter, the width of the distribution of surface normals.

BACKGROUND OF THE INVENTION

1. Field of Invention

The present invention relates generally to machine vision, and more particularly, to a method of modeling the off-specular reflection of light to allow a machine to recognize the image of an object illuminated by varying unknown lighting conditions.

2. Description of Related Art

It is clear that changes in lighting can have a large effect on how an object, such as a person, looks. Understanding this is essential to building effective object recognition systems.

While the Lambertian (or uniform) model of the scattering of light from real surfaces is central to any study of object illumination, more sophisticated modeling is essential. In general, a variety of conditions combine to introduce anomalies into the simple model, especially those related to specular reflection (strong scattering over a narrow range of angles) and geometrically induced shadows. Recently, consideration has been given to the examination of the harmonic components of broadened, specular reflection, and the harmonics of cast shadows.

U.S. patent application Ser. No. 09/967,206 filed Sep. 28, 2001, entitled “Broadened-Specular Reflection and Linear Subspaces for Object Recognition”, the disclosure of which is hereby incorporated by reference, considered harmonic components of broadened, specular reflection in the Phong model.

While the Phong model is mathematically contrived, the Torrance-Sparrow model upon which the present invention is based, is a physically motivated model.

In addition, while the Phong model could be put into a reasonably tractable form by means of standard harmonic analysis, this is an unreasonable goal for the Torrance-Sparrow model. In accordance with the teachings of the present invention, a modified harmonic analysis was used which still enabled an approximation much more readily in the state space of spherical harmonics than in pixel space as graphics people usually do. In the previous invention, the higher harmonics were discarded. In the present invention the higher harmonics are kept in a modified (approximate) form, more approximate the less important the harmonics are.

Most importantly, the present invention makes use of simpler functions where arguments capture more of the angular dependencies than is possible with the usual expansions.

U.S. patent application Ser. No. 09/705,507, filed Nov. 3, 2000, entitled “Lambertian Reflectance and Linear Subspaces”, the disclosure of which is hereby incorporated by reference, considered the relationship between the function that describes the lighting intensity, and the reflectance function that describes how much light an object reflects as a function of its surface normal, under a given lighting condition. Representing these functions as spherical harmonics, it was shown that for Lambertian reflectance the mapping from lighting to reflectance is a convolution with a nearly perfect low-pass filter. High-frequency components of the lighting hardly affect the reflectance function. Therefore, nearly all Lambertian reflectance functions could be modeled as some linear combination of nine spherical harmonic components.

These low-dimensional approximations have two key advantages. First, they are described with few parameters, thus optimization is simpler. Moreover, the images produced under low-frequency lighting are inherently immune to small changes in orientation. A small rotation in the surface normal is equivalent to a small rotation in the light. However, low-frequency light does not appreciably change with a small rotation. The analysis shows this, in that an image produced by an n^(th) order harmonic light component is computed by taking an n^(th) degree polynomial of the components of the surface normal.

While promising, the invention described in U.S. patent application Ser. No. 09/705,507 considered only Lambertian reflectance. Specular reflectance, described in U.S. patent application Ser. No. 09/967,206, can significantly affect how an object appears. For example, a human face may have some oiliness, particularly on the forehead, which reflects light specularly. This is seen as highlights on the object.

While the invention described in U.S. Ser. No. 09/705,507 involved only Lambertian reflection, the Phong model is a simple mathematical rendering of diffuse specular reflectance. The Torrance-Sparrow model underlying the present invention is a fundamental improvement to make the reflectance physically accurate, a necessity for face recognition.

Specular reflectance cannot be approximated well by only considering low-dimensional linear subspaces which capture only low-frequency lighting. Intuitively, the set of possible reflectance functions for a perfect mirror is the same as the set of possible lighting functions. The question remains how to cope with specularity in object recognition using models that will inevitably be imperfect.

Specularities are often thought of as mainly present in spatially localized highlights, which occur when a bright light source is reflected by a shiny object. Such highlights can potentially be identified in the image and processed separately. For example, the algorithms described by Coleman, et al., in “Obtaining 3-Dimensional Shape of Textured and Specular Surfaces Using Four-Source Photometry”, Physics-Based Vision Principles and Practice, Shape Recovery, pp. 180-199 (1992), and by Brelstaff, et al., in “Detecting Specular Reflection Using Lambertian Constraints”, International Conference on Computer Vision, pp. 297-302 (1988), treat specular pixels as statistical outliers that should be discarded. However, specularities due to low-frequency lighting can be spread out throughout the entire image. Since these specularities affect every pixel in the image, their effect must be better understood; they cannot simply be discarded.

Some previous works have considered specular effects also as convolutions. Basri, et al. in NEC Research Institute Technical Report No. 2000-112, entitled “Lambertian Reflectance and Linear Subspaces” (August 2000) as revised in Technical Report No. 2000-172R (December 2000) considered a version of the Phong model in which the specular lobe is a rotationally symmetric shape centered about a peak that is a 180-degree rotation of the direction of the incoming light about the surface normal. In such a model, specular reflection doubles the frequency of the incoming light, and then acts as a convolution. However, this model is heuristic, and not physically based. It does not extend to realistic models.

Ramamoorthi, et al., in “On the Relationship between Radiance and Irradiance: Determining the Illumination From Images of a Convex Lambertian Object”, Journal of the Optical Society of America A, Vol. 18, No. 10, pp. 2448-2459 (2001), considered the effects of arbitrary bi-directional reflectance distribution functions (BRDFs) on the light field. They were able to develop algorithms for recovering the BRDF and/or the lighting given a measured light field and an object with a known 3D structure. Though interesting, these results are not generally applicable to machine vision because, without special sensing devices, the light field is not available. An image of an object is produced by the reflectance function that describes how the surface normals reflect light in one fixed direction. Therefore, an image corresponds to a 2D slice through the light field. For an arbitrary BRDF, the 2D reflectance function for a fixed viewpoint no longer results from a convolution of the lighting.

BRIEF SUMMARY OF THE INVENTION

The goal of the present invention is to allow a machine, such as a computer, to match an input image of an object, such as a human face, to an object model stored in a database associated with the machine, and to perform this matching with a high degree of accuracy.

The steps of the recognition method of the present invention include providing a database of three-dimensional object models, providing an input image, positioning each three dimensional model relative to the input image, determining an optimal rendered image of the model that is most similar to the input image, computing a measure of similarity between the input image and the optimal rendered image of each model, and selecting the object whose optimal rendered image is most similar to the input image. The step of determining an optimal rendered image includes deriving a reflectance function for each object that includes the effects of both broadened-specular and diffuse reflection, and optimizing that reflectance function to most closely match the input image.

The described method of the present invention includes rendering the images produced by an object model when illuminated only by the fundamental along with each harmonic component of light to create the effect that there are no negative regions, or some other combinations which still cover all the harmonics of interest. The summation of these components defines the reflectance function for the object model. The derived reflectance function takes into account the intensity of light components incident on the object model, the intensity of light diffusely reflected from the model, and the intensity of off-light specularly reflected from the model, the last component being dependent on the angle between the direction of the observer and the direction of maximum specular reflection.

The advance in the art provided by the present invention resides in the fact that unlike the Lambertian case in which the reflectance depends only on the surface normal, and only harmonics of the surface normal are considered, the reflectance expressed by any model including off-specular reflection involves two coupled dependencies, that on the surface normal and that on the direction of the reflected light. The number of terms in such an expansion grows only as n² for the Lambertian, but as n⁴ for diffuse, specular reflection, and in addition n is larger for the latter case. The term “n” is the harmonic which is sometimes referred to as “I” in the text below. This complexity is avoided by using knowledge of physically correct, specular reflection to preserve both dependencies in a single harmonic expansion by using harmonics of a modified direction dependent on both the surface normal and the reflected direction of interest, returning the complexity to n². This result is somewhat analogous to having a spatial Fourier series in a plane (2D). For arbitrary surfaces one has products of Fourier components in the x and the y directions. However, if one knows the structure is roughly circular, or colinear, or some other symmetry, a 1D modified expansion may suffice, not simply x or y, but in a combination appropriate to the problem.

A principal object of the present invention is therefore, the provision of a method of modeling the off-specular reflection of light from an object to allow a machine to recognize the image of an object illuminated by varying lighting conditions.

Another object of the present invention is the provision of a method of modeling the off-specular reflection of light from an object using a modified Torrance-Sparrow model of the object to allow a machine to recognize the image of an object illuminated by varying lighting conditions.

A further object of the present invention is the provision of a method of modeling the off-specular reflection of light from an object using a modified Torrance-Sparrow model of the object to allow a machine to recognize the image of an object illuminated by varying lighting conditions for use in face recognition.

Further and still other objects of the present invention will become more clearly apparent when reading the following description of the invention

DETAILED DESCRIPTION OF THE INVENTION

Although detailed and/or microscopic models of reflection exist, these apply principally to homogeneous, rigid, material surfaces. For reflection from inhomogeneous, flexible surfaces such as faces, where most of the features of interest are configurational, a more robust model that captures the most important aspects of the scattered light is more appropriate. Thus the Lambertian model, which simply scatters incident radiation equally into the hemisphere above each surface element, is usually chosen.

The method of the present invention involves a much more complicated, physical model of reflectance developed by Torrance and Sparrow. The Torrance-Sparrow model of off-specular reflection is recast in a significantly simpler and more transparent form in order to render a spherical-harmonic decomposition more feasible. By assuming that a physical surface consists of small, reflecting facets whose surface normals satisfy a normal distribution, the model captures the off-specular enhancement of the reflected intensity distribution often observed at large angles of incidence and reflection, features beyond the reach of the phenomenological broadening models usually employed. The results predicted by the new model are relatively insensitive to values of its one parameter, the width of the distribution of surface normals. This is accomplished using both physical intuition and mathematical simplification. The result is an extraction of the principal dependences in the harmonic representation with a minimum of dependence on the details of the model.

Torrance-Sparrow Reflection Model (TSRM)

Torrance and Sparrow presented a physical model which captured several seemingly anomalous features of broadened, specular reflection from surfaces of metals and insulators. These features included off-specular maxima in the reflected intensity distribution and comparatively larger relative reflectance at larger angles of incidence. Neither of these features could be included in phenomenological broadening models such as the simpler Phong model which lacked both.

The model may be described as follows: the surface is taken to comprise a distribution of small, randomly-oriented, mirror-like facets, and the effects of shadowing and masking of facets by adjacent facets are included. Such roughened surfaces are the usual result of fabricating non-single-crystal samples. The off-specular maxima and enhanced reflectance result from the larger number of facets available for scattering at large angles of incidence. For example, in the limit of grazing incidence, the facet normal can vary by π radians in an arc orthogonal to both the plane of incidence and the nominal surface leaving the incident and reflected directions invariant.

In the following simplified derivation, there is a direct finding of Blinn's compact expressions for the shadowing/masking factor G and a slight altering of the facet-orientation distribution function. A detailed description of Blinn's work is found in the article J. F. Blinn, “Models of Light Reflection for Computer Synthesized Pictures”, Computer Graphics 11 (2), pp. 192-198 (1977). The masking factor G is described in detailed below. The present model removes a physical inconsistency in the original treatment, one which has been carried forward verbatim in nearly all subsequent discussions. This is significant since in its present form the TSRM cannot account even qualitatively for the experimentally-observed, off-specular reflection at high angles of incidence. A primary concern in the present invention is to represent the reflection in terms of spherical harmonics of the incoming illumination, analogous to prior treatments.

The Shadowing-Masking Factor G

As one would expect of scattering from a rough, faceted surface, a good deal of local masking and shadowing would occur between the facets. While some of this contributes to the diffuse (Lambertian) scattering observed, most is light scattered only once. The TSRM treats this by assuming that each facet of normal n_(γ) is paired with a complementary facet of normal n′_(γ)(n′_(γ)=2(n·n_(γ))n−n_(γ)) forming a V-shaped, trough-like local structure. In general, only a fraction (G) of the light falling on a trough can reach a reflecting surface, be reflected, and exit the trough without being shadowed on entering or masked on exiting. This purely geometric factor is G:0≦G≦1, and is independent of the depth (or size) of the trough.

Torrance and Sparrow provide a complicated, trigonometric derivation whose result was greatly compacted by Blinn, and is given in below. We provide a simple, direct derivation which includes other useful forms for G as well.

Consider a ray of light n_(e) reflected off the surface of a facet n_(γ) at a distance of x (along the facet) from the bottom of the trough, and exiting the trough by just grazing the upper edge of the adjoining facet of normal n′_(γ) (at a distance y (along the facet) from the bottom of the trough). Since any light reflected in direction n_(e) forms an interior angle of β with facet n_(γ) and α with facet n′_(γ),sinβ=n_(e)·n_(γ) and sinα=−n_(e)·n′_(γ). But by the law of sines x/y=sinα/sinβ: hence x/y=−n_(e)·n′_(γ)/n_(e)·n_(γ), and therefore G _(b)=(n _(e) ·n _(γ) +n _(e) ·n′ _(γ))/n _(e) ·n _(γ) But n′_(γ)=2(n·n_(γ))n−n_(γ)(n′_(γ) is just the reflection of n_(γ) about n, the nominal surface normal). Hence, G_(b)=2(n·n_(γ))(n·n_(e))/n_(γ)·n_(e). G_(b)=2(n·n_(γ))(n·n′_(e))/n_(γ)·n′_(e) is found similarly, or just by reciprocity, replacing the outgoing n_(e) with the incoming n′_(e). We note in passing that (n_(γ)+n′_(γ))=(2+2n_(γ)·n′_(γ))^(1/2)n, rendering G _(b)=(2+2n _(γ) ·n′ _(γ))^(1/2) n·n _(e) /n _(γ) ·n _(e) which is yet another form for G_(b). Strictly speaking, n_(e) includes a component parallel to the lateral (n_(γ)×n′_(γ)) axis of the trough, and although neither n_(γ) nor n′_(γ) has a corresponding component, this component does enter the normalization of n_(e). However, as only the ratio of the two dot products enters, use of the full n_(e) and n′_(e) is justified. Broadened, Specular Reflection in TSRM

Given a distribution of facets f(n_(γ)), where n_(γ) is the facet normal, the specular reflection r_(TS) of incident lumination L(n_(i)) can be written as r _(TS)(n _(e) ,n)=u(n·n _(e))∫dn _(i) L(n _(i))∫dn _(γ) f(n _(γ)) G(n,n _(γ) ,n _(e))δ(n _(i) −n′ _(e)) where n_(i) is the (negative) direction of the incident light, n_(e) is the direction of interest of the reflected light, n is the normal of the nominal surface in the region of interest, and n′_(e)=(2n_(γ)(n_(γ)·n_(e))−n_(e)) is the incident spectral direction corresponding to n_(e) for a facet whose normal is n_(γ). The term u(x) is the unit step function: u(x)=0 for x<0, u(x)=1 for x>0. The term u(n·n_(e)) ensures that only regions of the surface capable of reflecting light into n_(e) are considered. (The corresponding criterion for incident light, u(n·n_(i)), is included in the shadowing/masking factor G.) The Fresnel factor included by Torrance and Sparrow has been omitted. All vectors n_(k) are normalized.

Assume a facet distribution of normals of the form f(n _(γ))=exp(γn·n _(γ))/N N=2π(e ^(γ)−1)/γ The normalization N is such that the integral of f(n_(γ)) over the hemisphere where n·n_(γ)>0 is unity. This differs only slightly in form from the Gaussian distribution in the angle α (n·n_(γ)=cosα≈1−α²/2) used in the TSRM. This change, though minor numerically, offers significant algebraic simplification. (The heart of our distribution is therefore exp(−γα²/2) while that of TSRM is exp (−c²α²). The TSRM c=0.05/degree works out to c²=8.207/radian², corresponding to a γ of 16.414. In the present invention γ=5, 10 and 20 were chosen for the numerical work.)

As discussed above, the shadowing/masking factor G is given by $\begin{matrix} {{G\left( {n,n_{\gamma},n_{e}} \right)} = {\max\left( {0,{\min\left( {1,G_{b},G_{c}} \right)}} \right)}} \\ {{G_{b} = {2{n \cdot {n_{\gamma}\left( \frac{n \cdot n_{e}}{n_{\gamma} \cdot n_{e}} \right)}}}},{G_{c} = {2{n \cdot {n_{\gamma}\left( \frac{n \cdot n_{e}^{\prime}}{n_{y} \cdot n_{e}^{\prime}} \right)}}}}} \end{matrix}$ Clearly 0≦G≦1: G=1 when the reflection is such that there is neither masking nor shadowing of the incident or reflected light; G=G_(b) when some of the reflected light is masked, which can only occur when n·n_(e)<n·n′_(e); G=G_(c) when some of the incident light is shadowed, which can only happen when n·n′_(e)<n·_(^)n_(e):G_(b)<G_(c) and G_(c)<G_(b), respectively. (Since n_(γ) is the normal of the specularly reflecting facet, n_(γ·n) _(e)=n_(γ)·n′_(e).) (It should be noted that whereas most treatments of TSRM consider the reflected distribution in n_(e) for fixed n_(i), our primary interest is the reflected light in direction n_(e) for a given distribution in n_(i). This means that the most strongly reflected light will come from n_(i) where n·n_(i)<n·n_(e). By reciprocity, this concurs with the usual case where light reflected from a fixed n_(i) to some n_(e) is maximized for n·n_(i)>n·n_(e).)

The expression for r_(TS) can be readily cast into a spherical-harmonic form: First recall δ(n_(i) − n_(e)^(′)) = Σ_(l  m)Y_(l  m)(n_(e)^(′))Y_(l  m)^(*)(n_(i)) It is also advantageous to change the variable of the remaining integration from n_(γ) to n_(e). As in Torrance and Sparrow, this is done to express the integrand in terms of the solid angle of the reflected (TS) or the incident (here) light. Torrence and Sparrow refer to previous work of W. A. Rense in the Journal of Optical Society of America, 40, pp 55ff (1950) for this conversion. However, it is readily possible to derive the result by using n′_(e)=2n_(γ)(n_(γ)·n_(e))−n_(e) as follows: we can change n_(γ) to n_(γ)+dn_(γ) in only two dimensions, either perpendicular to n_(γ) and n_(e), dn_(γ⊥), or in the plane of n_(γ) and n_(e) (the plane of reflection) but perpendicular to n_(γ),dn_(γ∥). (As n_(γ) is of unit length, being a normal vector, n_(γ)·dn_(γ)=0.) Thus dn′_(e⊥)=2dn_(γ⊥)(n_(γ)·n_(e))+2n_(γ)(dn_(γ⊥)·n_(e))=2(n_(γ)·n_(e))dn_(γ⊥) as dn_(γ⊥)·n_(e)=0. Similarly dn′_(e∥)=2dn_(γ∥). This is more readily seen by noting that in the plane of reflection the change in the angle between incident and reflected rays is double the change between incident and normal. Thus dn_(γ)=dn′_(e)/4(n_(γ)·n_(e)), and r_(TS) takes the form r _(TS)(n _(e) ,n)=u(n _(e) ·n)Σ_(lm) L _(lm) R _(lm)(n _(e) ,n) R _(lm)(n _(e) ,n)=∫dn′ _(e) Y _(lm)(n′ _(e))G(n,n _(γ) ,n _(e))e ^(γn n) ^(γ) /4N(n _(γ) ·n _(e)) L _(lm) =∫dn _(i) L(n _(i))Y* _(lm)(n _(i)) Here of course, n_(γ) satisfies n′_(e)=(2n_(γ)(n_(γ)·n_(e))−n_(e)).

Missing in the above expression is the (n_(γ)·n′_(e))/(n·n_(e)) factor present in Torrance and Sparrow, and in Blinn. The factor arises because in passing from intensities to fluxes and then back to intensities, Torrance and Sparrow perform the first conversion as if the reflection were due to individual facets, which is correct, but the second conversion is performed as if the reflection were due to the average surface, which is incorrect. The correct factor is, therefore, (n_(γ)·n′_(e))/(n_(γ)·n_(e)) which, of course, is unity. The present invention avoids this unnecessary complication and the result satisfies reciprocity while TSRM's does not.

Spherical-Harmonic Factor R_(lm) (n_(e),n)

For any reasonable γ(e.g. γ>10), the [Gexp(γn·n_(γ))/(n_(γ)·n_(e))]=F factor reaches a maximum for n·n_(γ)≈1, and the maximum is comparatively sharp, at least for the relatively low values of lm of interest. The change of variables from n_(γ) to n′_(e) ensures that the domain of n′_(e), dn′_(e), is well-contained even for relatively small (n_(γ)·n_(e)): recall dn′_(e)=4(n_(γ)·n_(e))dn_(γ). Also, it is the diminishing value of the (n_(γ)·n_(e)) factor which leads to larger reflectance for larger angles of incidence: for smaller (n_(γ)·n_(e)), a larger fraction of the facets contribute to the reflection.

Now, first calculate the value n_(γc) of n_(γ) which maximizes F. The result is that there are two regions in (n·n_(e)) to be considered: n·n_(e)>n·n_(eg) where the maximum occurs for G=1; n·n_(e)<n·n_(eg) where the maximum occurs for G_(c)=1 and n_(γc)=n_(γg). The critical value n·n_(eg) depends only on γ; the larger γ, the larger n·n_(eg). From n_(γc) we can obtain n′_(ec)=2n_(γc)(n_(γc)·n_(e))−n_(e) and take Y_(lm)(n′_(ec)) out of the integral in R_(lm)(n_(e),n). Then the remaining integral can be approximated as a two-dimension Gaussian integral and evaluated.

First calculate the facet normal n_(γc) which maximizes F for G=1. One method is to differentiate with respect to n·n_(γ), the component of n_(γ) parallel to n (from which n_(γ) can be determined, since by symmetry n_(γc) lies in the (n,n_(e)) plane). There is an easier way, which, moreover, will be of value when evaluating the integral over n′_(e). Suppose m is a vector in the (n,n_(e)) plane. Let η be the angle between m and n_(γ). Then m·n_(γ)=cos η. If now one changes n_(γ) to n_(γ)+dn_(γ∥), this corresponds to rotating n_(γ) in the (n,n_(e)) plane. Since d(m·n_(γ))/dη=−sin η=−(1−cos²η)^(1/2)=−(1−(m·n_(γ))²)^(1/2), and since n_(γ) has unit length (so that dη=dn_(γ∥)), it follows that d(m·n_(γ))/dn_(γ∥)=−(1−(m·n_(γ))²)^(1/2). Hence, ∂(n·n_(γ))/∂n_(γ∥)=−(1−(n·n_(γ))²)^(1/2), ∂(n_(γ)·n_(e))/∂n_(γ∥)=−(1−(n_(γ)·n_(e))²)^(1/2).

Varying F with respect to n_(γ∥) shows that n_(γc) satisfies

 γ(1−(n·n _(γ))²)^(1/2)(n _(γ) ·n _(e))=(1−(n _(γ) ·n _(e))²)^(1/2)

and γ(1−n·n _(γ) ²)^(1/2)(n·n _(γ) n·n _(e)−(1−n·n _(γ) ²)^(1/2)(1−n·n _(e) ²)^(1/2))=n·n _(γ)(1−n·n _(e) ²)^(1/2) +n·n _(e)(1−n·n _(γ) ²)^(1/2) (The notation has been simplified so that n·n_(γ) ²=(n·n_(γ))² and n·n_(e) ²=(n·n_(e))².) Solving for (1−n·n_(γ) ²)^(1/2) the result is: $\left( {1 - {n \cdot n_{\gamma\quad c}^{2}}} \right)^{1/2} = \frac{{n \cdot {n_{e}\left( {{n \cdot n_{\gamma}} - \gamma^{- 1}} \right)}} - \left( {{n \cdot {n_{e}^{2}\left( {{n \cdot n_{\gamma}} - \gamma^{- 1}} \right)}^{2}} - {4\left( {1 - {n \cdot n_{e}^{2}}} \right){n \cdot {n_{\gamma}/\gamma}}}} \right)^{1/2}}{2\left( {1 - {n \cdot n_{e}^{2}}} \right)^{1/2}}$ By taking n·n_(γ)=1 on the right-hand side of the equation, and knowing n·n_(e) and γ, a very accurate value for n·n_(γc) is obtained on the left-hand side of the equation, which can be improved by iteration if necessary. From n·n_(γ) we have n_(γ)·n_(e)=n·n_(γ)n·n_(e)−(1−n·n_(γ) ²)^(1/2)(1−n·n_(e) ²)^(1/2), and hence F for n_(γ)=n_(γc) and G=1. (When solving the quadratic equation, the minus sign is chosen in order to obtain the correct limit as n·n_(e)→1.)

Now it is necessary to ascertain for which value n·n_(eg) of n·n_(e) G_(c)=1. For n·n_(e)<n·n_(eg), G<1 and F will decrease more rapidly than any corresponding increase in the other factors. Hence, G_(c)=1 fixes n·n_(γc) for n·n_(e)<n·n_(eg). Thus setting G_(c)=2n·n_(γ)n·n′_(e)/n_(γ)·n′_(e)=1 results in

 n _(γ) ·n _(e)=2n·n _(γ)(2n·n _(γ) n _(γ) ·n _(e) −n·n _(e)),

from which it follows that (1−n·n _(γg) ²)^(1/2) =n·n _(γ) n·n _(e)(1−2(4n·n _(γ) ²−1)⁻¹)(1−n·n _(e) ²)^(−1/2) which as above can be solved for n·n_(γg) in a few iterations. Here n_(γg) is n_(γ) for G_(c)=1 given n_(e). Equating the expression for n_(γc) and n_(γg), results in an expression for n_(eg) n·n _(eg)=(1+γ(2n·n _(γ)(4n·n _(γ) ²−1)⁻¹−γ⁻¹)(1−2(4n·n _(γ) ²−1)⁻¹))^(−1/2) where n·n_(γ)=n·n_(γg) for n·n_(e)=n·n_(eg). Since n·n_(γg) is nearly unity, n·n _(eg)≈(1+(2γ/3−1)/3)^(−1/2) These expressions enable us to evaluate F_(max) for all (n,n_(e)) pairs. Values for F_(m)/F₀ are given in Table 1, where F_(m)=F_(max) and F₀ is F at the angle for specular reflection (n·n_(γ)=1). In Table 1, θ_(e) is the angle of reflection of interest relative to the nominal-surface normal (n·n_(e)=cosθ_(e)), θ_(i) is the incident angle which maximizes the reflectance into θ_(e)(n·n′_(e)(n_(γe))=cosθ_(i)), and F_(m)/F₀ is the ratio of the reflectance from light incident at θ_(i) to that incident at θ_(e), i.e., nominal specular reflection. The smaller γ, the greater the fluctuation permitted in the facet normals, and hence the greater angle as well as magnitude of off-specular scattering which results. The horizontal lines in the table distinguish regions where the maximum reflection occur for G_(c)>1 (smaller angles) and G_(c)=1 (larger angles). For the latter, the location of the maxima is independent of γ, the key parameter in Gaussian distributions. Unlike TSRM, due to masking and shadowing the reflection goes rapidly to zero as the incident angle exceeds θ_(i). Also, the magnitude of the enhancement is significantly reduced. The former is expected from physics, and is absent in the TSRM. In the TSRM it results from incorrectly calculating the scattered flux. The latter presumable results from not including the appropriate Frensnel factor.

TABLE 1 γ = 5 γ = 10 γ = 20 θ_(e) θ_(i) F_(m)/F₀ θ_(i) F_(m)/F₀ θ_(i) F_(m)/F₀ 00.00 00.00 1.000 00.00 1.000 00.00 1.000 18.20 27.98 1.014 22.45 1.006 21.14 1.002 25.84 41.01 1.032 32.20 1.014 28.79 1.006 31.79 52.73 1.057 40.10 1.023 35.62 1.010 36.87 65.84 1.093 47.21 1.034 41.54 1.015 41.41 73.80 1.150 54.04 1.049 46.98 1.022 45.57 75.19 1.200 60.98 1.070 52.14 1.030 49.46 76.49 1.254 68.67 1.099 57.18 1.039 53.13 77.71 1.286 77.71 1.147 62.18 1.054 56.63 78.88 1.322 78.88 1.204 67.45 1.073 60.00 80.00 1.355 80.00 1.256 73.30 1.103 63.26 81.09 1.382 81.09 1.303 81.09 1.154 66.42 82.14 1.408 82.14 1.344 82.14 1.224 69.51 83.17 1.430 83.17 1.380 83.17 1.286 72.54 84.17 1.448 84.17 1.413 84.17 1.341 75.52 85.17 1.464 85.17 1.439 85.17 1.389 78.46 86.15 1.477 86.15 1.461 86.15 1.428 81.37 87.13 1.487 87.13 1.478 87.13 1.457 84.26 88.09 1.494 88.09 1.487 88.09 1.477 87.13 89.05 1.499 89.05 1.492 89.05 1.490 88.85 89.62 1.507 89.62 1.496 89.62 1.496

Now, evaluate the integral over n′_(e). Having factored the spherical harmonic Y_(lm)(n′_(ec)) out of the integral in R_(lm)(n_(e),n), the remaining integral I is

 I=∫dn′ _(e)exp(H(n·n ₆₅ ,n _(γ) ·n _(e))), H=γn·n _(γ) −ln((n _(γ) ·n _(e))/G)

As ∂H/∂n_(γ∥)=0 determines n_(γ)=n_(γc), and ∂H/∂n_(γ⊥)=0 for n_(γ)=n_(γc) by symmetry, we can write approximately that ${I = {{\exp\left( H_{c} \right)}{\int{{\mathbb{d}n_{e}^{\prime}}\quad{\exp\left( {{- \frac{1}{2}}\left( {{A_{}\left( {n_{e}^{\prime} - n_{e{c}}^{\prime}} \right)}^{2} + {A_{\bot}n_{e\bot}^{\prime\quad 2}}} \right)} \right)}}}}},$  I=2πexp(H _(c))/(A _(∥) A _(⊥))^(1/2) , H _(c) =H(n·n _(γc) ,n _(γc) ·n _(e))

Here A_(∥)=−∂²H/∂n′_(e∥) ², and A_(⊥)=−∂²H/∂n′_(e⊥) ², both evaluated for n_(γ)=n_(γc). The cross term ∂²H/∂n_(γ∥)∂n_(γ⊥) is zero by symmetry.

To evaluate A_(∥) and A_(⊥) we use a variety of simplifications. First, changing n_(γ) to (n_(γ)+dn_(γ⊥)), it is necessary to include a factor of (1+dn_(γ⊥) ²)^(−1/2)≈1−dn_(n⊥) ⁻²/2 to preserve the normalization. Thus ∂n_(γ)/∂n_(γ⊥)=0 and ∂²n_(γ)/∂²n_(γ⊥)=−n_(γ)/2. (Also ∂²n_(γ)/∂n_(γ∥)∂n_(γ⊥)=0.) To obtain the ∂²n_(γ)/∂n′_(e⊥) ² recall that dn′_(e⊥)=2(n_(γ)·n_(e))dn_(γ⊥). Thus (for G=1) A_(⊥) becomes $\begin{matrix} {A_{\bot} = {{- \frac{1}{4}}\left( {{\gamma\quad\frac{1}{n_{\gamma} \cdot n_{e}}\frac{\partial}{\partial n_{\gamma\bot}}\left( {\frac{1}{n_{\gamma} \cdot n_{e}}\frac{{\partial n} \cdot n_{\gamma}}{\partial n_{\gamma\bot}}} \right)} -} \right.}} \\ \left. {\frac{1}{n_{\gamma} \cdot n_{e}}\frac{\partial}{\partial n_{\gamma\bot}}\left( {\frac{1}{n_{\gamma} \cdot n_{3}}\frac{\partial{\ln\left( {n_{\gamma} \cdot n_{e}} \right)}}{\partial n_{\gamma\bot}}} \right)} \right) \end{matrix}$ where ∂(n·n_(γ))/∂n_(γ⊥)=0,∂²(n·n_(γ))/∂n_(γ⊥) ²=−(n·n_(γ))/2, and similarly for (n_(γ)·n_(e)). Evaluating one finds A_(⊥)=(γn·n_(γc)−1)/8(n_(γc)·n_(e))² For A_(∥) recall that dn′_(e∥)=2dn_(γ∥) and that ∂(n·n_(γ))/∂n_(γ∥)=−(1−(n·n_(γ))²)^(1/2). A similar calculation, also for G=1, yields $A_{} = {\frac{1}{4}\left( {{\gamma\quad{n \cdot n_{\gamma\quad c}}} - \left( {n_{\gamma\quad c} \cdot n_{e}} \right)^{- 2}} \right)}$ Although the second term on the right appears to become large as n·n_(e) decreases, it will be apparent that taking G=1 is no longer correct. As the dependence is not a particularly sensitive one compared to the spherical-harmonic dependence, approximate $A_{} \approx {\frac{1}{4}\left( {{\gamma \cdot n_{\gamma\quad c}} - 1} \right)}$ as an upper bound. Combining the above finally that results R* _(lm)(n _(e) ,n)=2^(1/2) γe ^(γn n) ^(γc) Y _(lm)(n′ _(ec))/(γn·n _(γc)−1)(e ^(γ)−1) where n′_(ec)=2n_(γc)(n_(γc)·n_(e))−n_(e). Harmonic Representation

The approximation that the spherical harmonic Y_(lm)(n′_(e)) is relatively constant over the most significant portion of the integral over n′_(e) is clearly not accurate for sufficiently large l. Consider the simpler case of n_(e)=n: reflection in the normal direction. Define I _(l)(γ)=∫dn′ _(e) e ^(γn n) ^(γ) G(n·n′ _(e))Y ₁₀(n′ _(e))/4n·n _(γ)=2π((2l+1)/4π)^(1/2)∫₂ _(−1/2) ¹ due ^(γu) P _(l)(2u ²−1)g(u) where P_(l)(x) is the Legendre function of order I: P _(l)(x)=d ^(l)(x ²−1)^(l) /dx ^(l)/2^(l) l! and where g(u)=1 for 3^(1/2)/2≦u≦1, and g(u)=2(2u²−1) for 2^(1/2)/2≦u≦3^(1/2)/2. Note that I_(l)(γ)=NR₁₀(n,n). Let I*_(l)(γ)be I_(l)(γ) with P_(l)(2u²−1) set equal to its value for u=1, that is set to unity. Then the ratio I _(l) /I* _(l)(γ) gives a measure of the reduction of R_(lm) with increasing l.

While one can evaluate I_(l)(γ) completely, consider the following simplification. For large γ, only the portion P_(l)(u) of near u=1 will matter. Now P_(l)(1)=1 for all l, and P′ _(l)(1)=lP _(l)(1)+P′ _(l−1)(1) according to the standard recursion relation xP′_(n)(x)−P′_(n−1)(x)=nP_(n)(x). Thus P′_(l)(1)=l(l+1)/2, and for l>0 we can replace P_(l)(x) with a_(l)x+b_(l), x_(l)≦x≦1, x_(l)=−b_(l)/a_(l), a_(l)=l(l+1)/2, b_(l)=1−a_(l), a straight line with slope a_(l). After a little algebra one obtains I _(l)(γ)≈((2l+1)π)^(1/2)(e ^(γ)/γ)(1−h ⁻¹ +e ^(−h) /h) with h=2γ/l(l+1). Comparing with I* _(l)(γ)=((2l+1)π)^(1/2)(e ^(γ)−1)/γ where Y_(lm)(1) is pulled out of the integrand, one can replace the R^(*) _(lm)(n_(e),n) given above with R _(lm)(n _(e) ,n)=I _(l)(γ)R*_(lm)(n _(e) ,n)/I* _(l)(γ) to correct for the 1-dependence of Y_(lm)(n′_(e)) in the integral over facets. The I/I* goes as h/2(1−e^(−γ)) for h small.

A complete evaluation of I_(l)(γ) is performed. To do this we make use of several expressions: First, we can write any Legendre polynomial in the form ${P_{l}(x)} = {\sum\limits_{r = 0}^{\lbrack{1/2}\rbrack}{\left( {- 1} \right)^{r}{\left( {{2l} - {2r}} \right)!}\quad{x^{l - {2r}}/2^{l}}{r!}{\left( {l - r} \right)!}{\left( {l - {2r}} \right)!}}}$ Here [z]=the greatest integer contained in z. Second, we will need the binomial expansion for (2u²−1) $\left( {{2u^{2}} - 1} \right)^{l - {2r}} = {\sum\limits_{k = 0}^{l - {2r}}{{\left( {l - {2r}} \right)!}\left( {2u^{2}} \right)^{k}{\left( {- 1} \right)^{l - k}/{k!}}{\left( {l - {2r} - k} \right)!}}}$ Third, the indefinite integral ${\Gamma\left( {{u;\gamma},k} \right)} = {{\int{{\mathbb{d}u}\quad e^{\gamma\quad u}u^{2k}}} = {\left( {e^{\gamma\quad u}/\gamma^{{2k} + 1}} \right){\sum\limits_{n = 0}^{2k}{\left( {{- \gamma}\quad u} \right)^{{2k} - n}{{\left( {2k} \right)!}/{\left( {{2k} - n} \right)!}}}}}}$ Finally, defining $\begin{matrix} {{I_{l}\left( {b,a} \right)} = {\int_{a}^{b}{{\mathbb{d}u}\quad e^{\gamma\quad u}{P_{l}\left( {{2u^{2}} - 1} \right)}}}} \\ {{I_{gl}\left( {b,a} \right)} = {\int_{a}^{b}{{\mathbb{d}u}\quad e^{\gamma\quad u}2\left( {{2u^{2}} - 1} \right){P_{l}\left( {{2u^{2}} - 1} \right)}}}} \end{matrix}$ we can write I_(l)(γ)=I_(l)(1,3^(1/2)/2)+I_(gl)(3^(1/2)/2,2^(1/2)/2) yielding R_(lm)(n_(e),n)≈R*_(lm)(n_(e),n)I_(l)(γ)/I*(r), with I*(γ)=I*(1,3^(1/2)/2)+I*_(g)(3^(1/2)/2,2^(1/2)/2),I*(u)=exp(γu)/γ, and I*_(g)(u)=exp(γu) (γ²u²−2γu+2)/γ³. After some algebra, we find the indefinite integrals I_(l)(u) and I_(gl)(u) in I_(l)(b,a), respectively to be $\begin{matrix} {{I_{l}(u)} = {\sum\limits_{k = 0}^{l}{{C_{0}\left( {l,k} \right)}{\Gamma\left( {{u;\gamma},k} \right)}}}} \\ {{I_{gl}(u)} = {{{- 2}{C_{0}\left( {l,0} \right)}{{\mathbb{e}}^{\gamma\quad u}/\gamma}} + {2{\sum\limits_{k = 1}^{l + 1}{{C_{1}\left( {l,k} \right)}{\Gamma\left( {{u;\gamma},k} \right)}}}}}} \\ {{C_{0}\left( {l,k} \right)} = {\sum\limits_{r = 0}^{\lbrack{{({l - k})}/2}\rbrack}\frac{\left( {- 1} \right)^{l + r - k}{\left( {{2l} - {2r}} \right)!}}{2^{l - k}{r!}{\left( {l - r} \right)!}{k!}{\left( {l - {2r} - k} \right)!}}}} \\ {{C_{1}\left( {l,k} \right)} = {\sum\limits_{r = 0}^{\lbrack{{({l - k + 1})}/2}\rbrack}\frac{\left( {- 1} \right)^{l + r - k + 1}{\left( {{2l} - {2r}} \right)!}\left( {l - {2r} + 1} \right)}{2^{l - k}{r!}{\left( {l - r} \right)!}{k!}{\left( {l - {2r} - k + 1} \right)!}}}} \end{matrix}$ From these the l-dependent factor I_(l)(γ)/I*_(l)(γ) follows.

The method of deriving the reflectance function described above is used in the object recognition process. To match an input image with an object model in the database, the object model must be positioned to match the position of the input image. There are standard methods of performing this function known in the art, though a preferred method is disclosed in U.S. patent application Ser. No. 09/538,209, filed Mar. 30, 2000, entitled “Method for Matching a Two Dimensional Image to One of a Plurality of Three Dimensional Candidate Models in a Database”, the disclosure of which is hereby incorporated by reference.

Once positioned, images of the model are rendered under each of one or more spherical harmonic components of light as described above. These component rendered images can be linearly combined to arrive at an optimal rendered image of the model. An optimal rendered image means a rendered image that most closely approximates the input image. The comparison of the various rendered images to the input image preferably is made by calculating the Euclidian Distance between the images, in a manner that is known in the art. The optimization is performed by a least squares fit technique between the vector that is the reflectance function and the matrix that represents the input image, also known in the art.

Other steps follow the optimization in the recognition process. One is computing some measure of similarity between the input image and the optimal rendered image for each model. Preferably, this is accomplished be measuring the Euclidian Distance between each optimal image and the input image. The object model whose optimal rendered image is nearest the input image, assuming some threshold value of similarity must be reached, is a match to the input image.

While the reflectance function of the present invention is described in application to the field of machine vision, it is not limited to that field. There are numerous parallels between this work and advances in the field of computer graphics, and our invention has applicability there as well. The field of computer graphics is continually striving to produce more realistic rendered images based on object models that exist only in the computer. The reflectance function of the present invention advances that work as well.

In summary, in accordance with the teachings of the present invention, there have been derived several harmonic expressions for the Torrance-Sparrow model of off-specular reflection. In the process there is a significantly simplification of both the derivation and the expression of the results of their model and restored reciprocity between incidence and reflection. There is noted an insensitivity of the position and magnitude of the off-specular reflection at large angles to the distribution of facet normals. This result is an advancement of the existing state of the art, since results which are too sensitive to parametric models are unreliable. Also results significantly different from those predicted would necessitate a qualitatively different model.

While there has been described a method of modeling the off-specular reflection of light to allow a machine to recognize the image of an object illuminated by varying unknown lighting conditions, it will be apparent to those skilled in the art that variations and modifications are possible without deviating from broad teachings of the present invention which shall be limited solely by the scope of the claims appended hereto. 

1. A method of deriving the reflectance function of an object model under a variety of lighting conditions, the object model comprising a plurality of surfaces, each of the surfaces defining a normal vector pointing perpendicularly outward, the method comprising the steps of: (a) rendering, for a given orientation of the object model, a plurality of images produced by the object model when illuminated by each of a plurality of spherical harmonic components of incident light, wherein said rendering comprises: (i) calculating the intensity of incident light components upon the object model, relative to the normal at each surface; (ii) calculating the intensity of light components diffusely reflected by the model toward the observer; (iii) calculating the intensity of light components off-specularly reflected toward the observer, relative to the observer's angle with respect to the angle of maximum specular reflection; and (b) defining a reflectance function for the object as a linear combination of said plurality of images.
 2. The method according to claim 1, wherein said plurality of spherical harmonic components include the 0^(th) order spherical harmonic component of incident light.
 3. The method according to claim 1, wherein the object model is a face.
 4. The method according to claim 1, wherein said calculating the intensity of light components broadened-specularly reflected toward the observer comprises using a modified Torrance-Sparrow model of the object.
 5. The method according to claim 4, wherein the object model is a face.
 6. A method of recognizing objects under various lighting conditions comprising the steps of: (a) providing a database comprising a plurality of three dimensional models, (b) providing an input image, (c) positioning each three dimensional model relative to the input image, (d) determining, for each three dimensional model, a rendered image which is most similar to the input image, said determining step comprising: (i) deriving a reflectance function that describes an approximation of the set of all possible rendered images that each three dimensional model can produce under all possible lighting conditions, said rendered images including both diffusely and off-specularly reflected light, and said reflectance function employs a model of broadened-specular reflectance that accounts for the angle between the direction of maximum specular reflectance; and (ii) optimizing the reflectance function to determine rendered image of each model that is most similar to the input image; (e) computing a measure of similarity between the input image and each optimal rendered image; and (f) selecting the three dimensional model corresponding to the optimal rendered image whose measure of similarity is most similar to the input image.
 7. The method of claim 6, wherein the input image is the image of a face.
 8. The method of claim 7, where the three dimensional models are models of heads.
 9. The method according to claim 6 wherein said off-specular reflectance model comprises a modified Torrance-Sparrow model.
 10. The method of claim 9, wherein the input image is the image of a face. 